package com.hibase.upms.service.userrole.impl;


import com.hibase.core.mybatis.service.BaseServiceImpl;
import com.hibase.upms.entity.userrole.MdsUserRole;
import com.hibase.upms.mapper.userrole.MdsUserRoleMapper;
import com.hibase.upms.service.userrole.MdsUserRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hufeng
 * @since 2019-04-03
 */
@Service
public class MdsUserRoleServiceImpl extends BaseServiceImpl<MdsUserRoleMapper, MdsUserRole> implements MdsUserRoleService {

    /**
     * 查询当前用户所分配的角色id
     */
    @Override
    public List<String> selectRoleIdByCurrentUser(String userId) {
        return super.getBaseMapper().selectRoleIdByCurrentUser(userId);
    }

    @Override
    public String selectRoleIdByCode(String code) {
        return super.baseMapper.selectRoleIdByCode(code);
    }
}
